package cn.liberals.feign;

import cn.liberals.domain.Store;
import cn.liberals.utils.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class StoreFallbackFactory implements FallbackFactory<StoreFeignClient> {
    @Override
    public StoreFeignClient create(Throwable throwable) {
        return store -> new AjaxResult(false,"当前访问人数过多，请稍后再试");
    }
}
